﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using RoundupReadyPlusWPF.Pages;

namespace RoundupReadyPlusWPF.AppCode
{
    /// <summary>
    /// Responsavel por fabricar uma instancia de uma pagina
    /// </summary>
    public class PageFactory
    {

        public static UserControl NewPage(PageSwitcher.Pages page)
        {
            UserControl returnPage = null;

            switch (page)
            {
                case PageSwitcher.Pages.Region:
                    returnPage = new PageRegion();
                    break;

                case PageSwitcher.Pages.State:
                    returnPage = new PageState();
                    break;

                case PageSwitcher.Pages.District:
                    returnPage = new PageDistrict();
                    break;

                case PageSwitcher.Pages.Town:
                    returnPage = new PageTown();
                    break;

                case PageSwitcher.Pages.Filters:
                    returnPage = new PageFilters();
                    break;

                case PageSwitcher.Pages.Table:
                    break;

                case PageSwitcher.Pages.Map:
                    break;
            }

            return returnPage;
        }
    }
}
